LassoScript Utility
Basics Browse Detail

[String->Remove]

Tag Link [String->Remove] Category String
Type Member Source Available No
Support Preferred Version 6.0
Change Unchanged Data Source Any
Output Type None Security None
Implementation LCAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0

Description

[String->Remove] removes a portion of the base string. Requires a single parameter which is the first character to be removed. An optional second parameter specifies how many characters should be removed. The second parameter defaults to removing all the characters to the end of the string.

This tag returns no value, but the base string is modified in-place.

Syntax

[Variable: 'myString' = 'String Value']
[$myString->(Remove: 5)]
[Variable: 'myString']

[$myString->(Remove: 5, 5)]

Parameters

Required Parameters
Offset The offset into the base string to be removed.
Optional Parameters
Length The number of characters to be removed from the base string. Defaults to the length of the string.

Examples

To remove a portion of a string:

Use the [String->Remove] tag. The following example removes the word 'brown' from the sample string.

[Variable: 'myString' = 'A quick brown fox']
[$myString->(Remove: 9,6)]
[Output: $myString]

A quick fox

Related Tags

Category Tags